package com.situ.mall.order.util;

import com.situ.mall.common.entity.Member;
import com.situ.mall.common.util.RequestUtil;

//前台服务session工具类
public class OrderSessionUtil {
    private static final String CURRENT_KEY="CURRENT_MEMBER";
    //获取前台当前登录的会员对象
    public static Member getCurrent(){
        Object obj=RequestUtil.getSession().getAttribute(CURRENT_KEY);//原来是ordersessionUtil
        if(obj==null){
            return null;
        }
        return (Member) obj;
    }
    public static void setCurrent(Member member){
        RequestUtil.getSession().setAttribute(CURRENT_KEY,member);
    }
}
